<template>
  <a-table :data="deviceList">
    <template #stopFlag="{ record }">
      <!-- 传入设备状态值，组件自动渲染对应标签 -->
      <stop-flag :value="record.stopFlag" />
    </template>
  </a-table>
</template>

<script setup lang="ts">
import {defineComponent as _defineComponent, ref} from "vue";

const deviceList = ref([
  { id: 1, groupName: '光伏板', stopFlag: 0 },
  { id: 2, groupName: '汇流箱', stopFlag: 1 }
])
</script>